import Vue from 'vue'
import App from './App.vue'
import router from "./router";
import http from './api/http'
import utils from './utils/util'
// 定制化引入组件Vant
import { Button, Cell, CellGroup, Icon, Col, Row, Popup, Toast, Checkbox, CheckboxGroup, Field, Radio, RadioGroup, Dialog, Loading, PullRefresh, Empty, List, Skeleton, Swipe, SwipeItem, Tag, Tab, Tabs, Divider, Form, ActionSheet, Stepper, ImagePreview } from 'vant'
import { Image as VanImage } from 'vant';
Vue.use(Button).use(Cell).use(CellGroup).use(Icon).use(VanImage).use(Col).use(Row).use(Popup).use(Toast).use(Checkbox).use(CheckboxGroup).use(Field).use(Radio).use(RadioGroup).use(Dialog).use(Loading).use(PullRefresh).use(Empty).use(List).use(Skeleton).use(Swipe).use(SwipeItem).use(Tag).use(Tab).use(Tabs).use(Divider).use(Form).use(ActionSheet).use(Stepper).use(ImagePreview)

Toast.setDefaultOptions({ duration: 2000 });

import 'vant/lib/index.less';
import { Lazyload } from 'vant';

import mixin from './mixins/mixin'
Vue.mixin(mixin)

Vue.prototype.$http = http;
Vue.prototype.$utils = utils;

Vue.use(Lazyload);

Vue.config.productionTip = false
router.beforeEach((to, from, next) => {
	document.title = to.meta.title || "会员中心";
	next();
});

window.vm = new Vue({
	router,
	render: h => h(App),
}).$mount('#app')
